package org.wangp.business.user.repository.remote.mock

import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Component
import org.springframework.web.bind.annotation.RequestMapping
import org.wangp.business.user.domain.OrderDTO
import org.wangp.business.user.domain.UserDTO
import org.wangp.business.user.repository.remote.IOrderCenter
import org.wangp.framework.core.domain.CommonResult

@Component("OrderCenterFallback")
@RequestMapping("fallback/order-center")
class OrderCenterFallback : IOrderCenter {

	companion object {
		val log: Logger = LoggerFactory.getLogger(OrderCenterFallback::class.java)
	}

	override fun getOrdersByUser(userDTO: UserDTO): CommonResult<List<OrderDTO>> {
		log.error("${this::getOrdersByUser.name} call fail")
		return CommonResult.fail()
	}
}
